import http from "../../../libs/http";

/**
 * 基础—选股字段数据区间(可视化选股) (tang)
 */
export async function queryOption(option)
{
  const url = "/searchserver/api/queryOption/valueRange.htm";
  const params = {
    ...option,
  };
  const res = await http.get(url, {
    params
  });
  return res.data;
}

/**
 * 基础—版块 (tang)
 */
export async function getblockList()
{
  const url = "/searchserver/api/queryOption/blockListByInt.htm";
  const params = {
    blockType: 1021
  };
  const res = await http.get(url, {
    params
  });
  return res.data;
}

/**
 * 指数列表 (tang)
 */
export async function getIndexList()
{
  const url = "/searchserver/api/queryOption/indexList.htm";
  const params = {

  };
  const res = await http.get(url, {
    params
  });
  return res.data;
}


/**
 * 选股search (tang)
 */
export async function queryJson(option)
{
  const url = "/searchserver/api/search/andOrQueryJson.htm";
  const params = {
    page: 1,
    pageSize: 200,
    ...option
  };
  const data = JSON.stringify(params);
  console.log(data)
  const res = await http.post(url, data);
  return res;
}


